/* 
 * File:   newmain.cpp
 * Author: ben
 *
 * Created on April 13, 2009, 9:21 AM
 */

#include <iostream>
#include <fstream>
#include <stdlib.h>
#include "MyGraphClass.h"
#include "xmlreader.h"

/*
 * 
 */
using namespace std;

int main(int argc, char** argv) {

    int i,j,k;

    if(argc<3)
        return(-1);
    cout << "PATH:" << argv[1] << endl;
    cout << "FILE:" << argv[2] << endl;

    XmlReader xr(argv[1],argv[2]);

    ofstream fout("output.dat");

    for(i=0;i<xr.getSize();i++){
        for(j=0;j<xr.getSize();j++){
            fout << i << "\t";
            fout << j << "\t";
            for(k=0;k<xr.getNm();k++){
                fout << xr.getVal(i,j,k) << "\t";
            }
            fout << endl;
        }
    }
    fout.close();
    return (EXIT_SUCCESS);
}
